//
//  WYCBillFrameModel.m
//  信用卡管理
//
//  Created by 中企互联 on 2017/11/8.
//  Copyright © 2017年 李胜军. All rights reserved.
//

#import "WYCDebitFrameModel.h"
#define fourFont [UIFont systemFontOfSize:60 * px]

@implementation WYCDebitFrameModel
- (void)setBillmodel:(WYCDebitModel *)Billmodel{
    _Billmodel = Billmodel;
    
    //cell的高度
    CGFloat cellW = ScreenWidth;
    
    //topView XYW
    CGFloat topViewX = 0;
    CGFloat topViewY = 0;
    CGFloat topViewW = cellW;
    
    
    CGFloat bigtopViewX = 20 * px;
    CGFloat bigtopViewY = 20 * px;
    CGFloat bigtopViewW = cellW - 40 * px;
    
    
    //图片
    _imageViewF = CGRectMake(40 * px, 80 * px, 100 * px, 100 * px);
    
    
    //银行昵称
    CGFloat bankNameX = CGRectGetMaxX(_imageViewF) + 80 * px;
    CGFloat bankNameY = 80 * px;
    NSString * bankNameStr = [NSString stringWithFormat:@"%@",Billmodel.bankname];
    CGSize bankNameSize = [bankNameStr sizeWithFont:fourFont];
    _bankNameF =  (CGRect){{bankNameX, bankNameY}, bankNameSize};
    
    CGFloat lastNumberX = bankNameX;
    CGFloat lastNumberY = CGRectGetMaxY(_imageViewF) + 80 * px;
    CGFloat lastNumberW = bigtopViewW - lastNumberX - 80 * px;
    CGFloat lastNumberH = 70 * px;
    _lastNumberF = CGRectMake(lastNumberX, lastNumberY, lastNumberW, lastNumberH);
    
    
    
    
    
    CGFloat bigtopViewH = CGRectGetMaxY(_lastNumberF) + 100 * px;
    
    _bigtopViewF = CGRectMake(bigtopViewX, bigtopViewY, bigtopViewW, bigtopViewH);
    CGFloat topViewH = CGRectGetMaxY(_bigtopViewF);
    
    
    
    _topViewF = CGRectMake(topViewX, topViewY, topViewW, topViewH);
    
    
    _cellHeight = topViewH;
    
}
@end


